<?php

namespace catchAdmin\swagger\controller;

define("DEV_API_HOST", "http://localhost:8000");
define("PRO_API_HOST", "http://catach.ranesuangyu.top");
define("TOKEN", "Bearer "."");
use catcher\base\CatchController;


class Swagger extends CatchController
{
    /**
     * @OA\OpenApi (openapi="3.0.1")
     * @OA\Info(title="catchAdmin接口文档", version="1.0.0", description="后台API",
     *     @OA\Contact(
     *          url="https://gitee.com/hcgmomo/catch-admin",
     *          email="596417202@qq.com"
     *      ),
     * )
     */

    /**
     *  @OA\Server(
     *      url="http://catach.ranesuangyu.top",
     *      description="线上服务器地址"
     * )
     *
     * @OA\Server(
     *      url="http://localhost:8000",
     *      description="本地地址"
     *  )
     *
     */
    function openApi() {
        $openapi = \OpenApi\scan([root_path().'catch']);
        header('Content-Type: application/json');
        echo $openapi->toJson();
    }

}